﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HotelMatchUtility.Entity;

namespace HotelMatchUtility.Comparer
{
    public class Impl_TelephoneComparer : HotelCompareBase, ICompareCondition
    {
        public Impl_TelephoneComparer()
        {
            ConditionName = "【精确】[电话相同匹配]且[坐标距离相距<5km]";
            IsExactCondition = true;
            IsExclusiveCondition = true;
            TargetIsContinue = true;
        }

        public override bool DoCompare(HotelEntity hotelTarget, HotelEntity hotelToCompare)
        {
            return hotelTarget.TelephoneCompare(hotelToCompare) && hotelTarget.LonLatToKilometer(hotelToCompare) < 5;
        }
    }
}
